/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * <h2><center>&copy; Copyright (c) 2021 STMicroelectronics.
  * All rights reserved.</center></h2>
  *
  * This software component is licensed by ST under BSD 3-Clause license,
  * the "License"; You may not use this file except in compliance with the
  * License. You may obtain a copy of the License at:
  *                        opensource.org/licenses/BSD-3-Clause
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f1xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define STAT2_Pin GPIO_PIN_0
#define STAT2_GPIO_Port GPIOC
#define nPG_Pin GPIO_PIN_1
#define nPG_GPIO_Port GPIOC
#define STAT1_Pin GPIO_PIN_2
#define STAT1_GPIO_Port GPIOC
#define CH_EN_Pin GPIO_PIN_3
#define CH_EN_GPIO_Port GPIOC
#define VIN_ADC_Pin GPIO_PIN_0
#define VIN_ADC_GPIO_Port GPIOA
#define VBAT_ADC_Pin GPIO_PIN_1
#define VBAT_ADC_GPIO_Port GPIOA
#define BATTEMP_ADC_Pin GPIO_PIN_2
#define BATTEMP_ADC_GPIO_Port GPIOA
#define BRDTEMP_ADC_Pin GPIO_PIN_3
#define BRDTEMP_ADC_GPIO_Port GPIOA
#define M_ISET_Pin GPIO_PIN_4
#define M_ISET_GPIO_Port GPIOA
#define SPI1_FLASH_SCK_Pin GPIO_PIN_5
#define SPI1_FLASH_SCK_GPIO_Port GPIOA
#define SPI1_FLASH_MISO_Pin GPIO_PIN_6
#define SPI1_FLASH_MISO_GPIO_Port GPIOA
#define SPI1_FLASH_MOSI_Pin GPIO_PIN_7
#define SPI1_FLASH_MOSI_GPIO_Port GPIOA
#define SPI1_FLASH_nCS_Pin GPIO_PIN_4
#define SPI1_FLASH_nCS_GPIO_Port GPIOC
#define M_IADC_Pin GPIO_PIN_5
#define M_IADC_GPIO_Port GPIOC
#define nPGB1_Pin GPIO_PIN_1
#define nPGB1_GPIO_Port GPIOB
#define M_nFAULT_Pin GPIO_PIN_8
#define M_nFAULT_GPIO_Port GPIOE
#define M_PWM1_Pin GPIO_PIN_9
#define M_PWM1_GPIO_Port GPIOE
#define M_nSD_Pin GPIO_PIN_10
#define M_nSD_GPIO_Port GPIOE
#define M_PWM2_Pin GPIO_PIN_11
#define M_PWM2_GPIO_Port GPIOE
#define I2C_CS_Pin GPIO_PIN_15
#define I2C_CS_GPIO_Port GPIOE
#define LoZi_CE_Pin GPIO_PIN_12
#define LoZi_CE_GPIO_Port GPIOB
#define SPI2_LoZi_SCL_Pin GPIO_PIN_13
#define SPI2_LoZi_SCL_GPIO_Port GPIOB
#define SPI2_LoZi_MISO_Pin GPIO_PIN_14
#define SPI2_LoZi_MISO_GPIO_Port GPIOB
#define SPI2_LoZi_MOSI_Pin GPIO_PIN_15
#define SPI2_LoZi_MOSI_GPIO_Port GPIOB
#define UART3_LoZi_TX_Pin GPIO_PIN_8
#define UART3_LoZi_TX_GPIO_Port GPIOD
#define UART3_LoZi_RX_Pin GPIO_PIN_9
#define UART3_LoZi_RX_GPIO_Port GPIOD
#define LoZi_RESET_Pin GPIO_PIN_10
#define LoZi_RESET_GPIO_Port GPIOD
#define LoZi_IO0_Pin GPIO_PIN_11
#define LoZi_IO0_GPIO_Port GPIOD
#define LoZi_IO1_Pin GPIO_PIN_12
#define LoZi_IO1_GPIO_Port GPIOD
#define LoZi_IO2_Pin GPIO_PIN_13
#define LoZi_IO2_GPIO_Port GPIOD
#define KEY1_Pin GPIO_PIN_6
#define KEY1_GPIO_Port GPIOC
#define KEY2_Pin GPIO_PIN_7
#define KEY2_GPIO_Port GPIOC
#define KEY3_Pin GPIO_PIN_8
#define KEY3_GPIO_Port GPIOC
#define KEY4_Pin GPIO_PIN_9
#define KEY4_GPIO_Port GPIOC
#define USART1_DEBUG_DIR_Pin GPIO_PIN_8
#define USART1_DEBUG_DIR_GPIO_Port GPIOA
#define USART1_DEBUG_TX_Pin GPIO_PIN_9
#define USART1_DEBUG_TX_GPIO_Port GPIOA
#define USART1_DEBUG_RX_Pin GPIO_PIN_10
#define USART1_DEBUG_RX_GPIO_Port GPIOA
#define USART4_ISO_TX_Pin GPIO_PIN_10
#define USART4_ISO_TX_GPIO_Port GPIOC
#define USART4_ISO_RX_Pin GPIO_PIN_11
#define USART4_ISO_RX_GPIO_Port GPIOC
#define USART4_ISO_DIR_Pin GPIO_PIN_12
#define USART4_ISO_DIR_GPIO_Port GPIOC
#define DO7_Pin GPIO_PIN_0
#define DO7_GPIO_Port GPIOD
#define DO6_Pin GPIO_PIN_1
#define DO6_GPIO_Port GPIOD
#define DO5_Pin GPIO_PIN_2
#define DO5_GPIO_Port GPIOD
#define DO4_Pin GPIO_PIN_3
#define DO4_GPIO_Port GPIOD
#define DO3_Pin GPIO_PIN_4
#define DO3_GPIO_Port GPIOD
#define DO2_Pin GPIO_PIN_5
#define DO2_GPIO_Port GPIOD
#define DO1_Pin GPIO_PIN_6
#define DO1_GPIO_Port GPIOD
#define SPI3_SENSOR_modeCS_Pin GPIO_PIN_7
#define SPI3_SENSOR_modeCS_GPIO_Port GPIOD
#define SPI3_SENSOR_SCK_Pin GPIO_PIN_3
#define SPI3_SENSOR_SCK_GPIO_Port GPIOB
#define SPI3_SENSOR_MISO_Pin GPIO_PIN_4
#define SPI3_SENSOR_MISO_GPIO_Port GPIOB
#define SPI3_SENSOR_MOSI_Pin GPIO_PIN_5
#define SPI3_SENSOR_MOSI_GPIO_Port GPIOB
#define I2C1_SENSOR_SCL_Pin GPIO_PIN_6
#define I2C1_SENSOR_SCL_GPIO_Port GPIOB
#define I2C1_SENSOR_SDA_Pin GPIO_PIN_7
#define I2C1_SENSOR_SDA_GPIO_Port GPIOB
/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
